package com.koala.learn.threadlearn.charter4;

/**
 * @Description TODO
 * @Date 2022/2/28 0:04
 * @Created by koala
 */

public class Start3 {
    public static void main(String[] args) {
        DefaultThreadPool<HouseWork> pool = new DefaultThreadPool<>(2);
        pool.execute(new HouseWork(10000L, "dinner"));
        pool.execute(new HouseWork(1000L, "clear"));
        pool.execute(new HouseWork(3000L, "dish"));
        pool.execute(new HouseWork(1000L, "close window"));
        pool.shutdown();
        System.out.println("main end");
    }
}
